<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@taglib uri="http://www.goodfox.com/jsp/tags/power" prefix="p"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring" %>
<script type="text/javascript">
function functionAddSubmit(formObj){
	$("#fun_add_funScopeName").val($("#fun_add_funScope").find("option:selected").text());
	$("#fun_add_funUseName").val($("#fun_add_funUse").find("option:selected").text());
	return validateCallback(formObj,navTabAjaxDone);
}
</script>
<div class="pageContent" style="border-left: 1px solid #B8D0D6;border-right: 1px solid #B8D0D6;">
	<div class="panelBar">
		<ul class="toolBar">
			<li><span><spring:message code="search.lnkGoAdd"/>功能</span></li>
			<li class="line">line</li>
		</ul>
	</div>
    <form id="addFunctionFrom" action="<c:url value="/function/functionAdd.shtml"/>" method="post" onsubmit="return functionAddSubmit(this);">
    <table class="tableForm" cellpadding="0" cellspacing="1" width="100%" align="center">          
        <tbody>
            <tr>
            	<td>所属功能：</td>
                <td>
                    <input type="hidden" name="fun_add.funIdParent" id="fun_add_funIdParent" value="${parentFun.funId}"/>
                    <input type="hidden" name="fun_add.funGradeParent" id="fun_add_funGradeParent" value="${parentFun.funGrade}"/>
                    <input type="text" name="fun_add.funNameParent" id="fun_add_funNameParent" value="${parentFun.funName}" readonly="readonly"/>
					<a class="btnLook" href="<c:url value="/function/goFunctionParentLookup.shtml"/>" lookupGroup="fun_add">选择所属功能</a>	
		            <a class="btnClean" href="javascript:;" onclick="$('#fun_add_funIdParent').val('');$('#fun_add_funGradeParent').val('');$('#fun_add_funNameParent').val('');">清空</a>
                </td>
                <td>适用范围：</td>
                <td>
	                <select class="required" name="fun_add_funScope" id="fun_add_funScope">
	                	<option value="">--请选择--</option>
	           			<c:forEach items="${scopeList}" var="atrScope">
	           				<option value="${atrScope.atrValue}">${atrScope.atrName}</option>
	           			</c:forEach>
	           		</select>
	    			<input type="hidden" name="fun_add_funScopeName" id="fun_add_funScopeName"/>
				</td>
            </tr>
            <tr>
                <td>功能名称：</td>
                <td>
                	<input class="required" type="text" name="fun_add_funName" id="fun_add_funName" maxlength="20">
                </td>
                <td>功能编码：</td>
                <td>
                	<input type="text" name="fun_add_funCode" id="fun_add_funCode" maxlength="20">
                </td>
            </tr>
            <tr>
                <td>使用方式：</td>
                <td>
	                <select class="required" name="fun_add_funUse" id="fun_add_funUse">
	                	<option value="">--请选择--</option>
	           			<c:forEach items="${useList}" var="atrUse">
	           				<option value="${atrUse.atrValue}">${atrUse.atrName}</option>
	           			</c:forEach>
	           		</select>
	    			<input type="hidden" name="fun_add_funUseName" id="fun_add_funUseName"/>
	    		</td>
                <td>显示排序：</td>
                <td>
                	<input type="text" name="fun_add_funSort" id="fun_add_funSort" maxlength="4">
                </td>
            </tr>
            <tr>
                <td>访问路径：</td>
                <td colspan="3">
                	<input type="text" name="fun_add_funUseUrl" id="fun_add_funUseUrl" maxlength="100">
                </td>
            </tr>
            <tr>
                <td>英文名称：</td>
                <td>
                	<input type="text" name="fun_add_funNameUs" id="fun_add_funNameUs" maxlength="20">
                </td>
                <td>功能值：</td>
                <td>
                	<input type="text" name="fun_add_funValue" id="fun_add_funValue" maxlength="50">
                </td>
            </tr>
            <tr>
                <td>备注：</td>
                <td colspan="3">
                	<input type="text" name="fun_add_funRemark" id="fun_add_funRemark" maxlength="100">
                </td>
            </tr>
        </tbody>
    </table>
	<div class="panelBar">
        <div class="buttonActive">
        <c:if test="${p:isPower('/function/functionAdd.shtml',sessionScope.loginAccount)}">
        <div class="buttonContent"><button type="submit"><spring:message code="add.btnAdd"/></button></div>
        </c:if>
        </div>
	</div>
    </form>
</div>